/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.webproject.jsp.common;

import java.sql.Connection;
import java.sql.DriverManager;

/**
 *
 * @author jeong
 */
public class JDriverManager {

    public JDriverManager() {
    }
    
    public static Connection getConnection() throws Exception {
        
        String driver = "com.mysql.jdbc.Driver";
        String url = "jdbc:mysql://localhost:3306/person";
        String userName = "admin";
        String password = "admin123";
        
        Class.forName(driver);
        Connection conn = DriverManager.getConnection(url, userName, password);
        
        return conn;
    }
    
}
